home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1371 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: solon.com!not-for-mail
  2. From: seebs@solutions.solon.com (Peter Seebach)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: printf - adding commas to numbers
  5. Date: 13 Jan 1996 00:13:55 -0600
  6. Organization: Usenet Fact Police (Undercover)
  7. Message-ID: <4d7ij3$811@solutions.solon.com>
  8. References: <4d15eq$lc5@ixnews2.ix.netcom.com> <4d3b5l$fsm@news.infi.net> <4d66rt$cc0@cloner3.netcom.com>
  9. NNTP-Posting-Host: solutions.solon.com
  10.  
  11. In article <4d66rt$cc0@cloner3.netcom.com>,
  12. Chuck Hamilton <chuckh@ix.netcom.com> wrote:
  13. >Adding delmiters to numbers is used everyday, everywhere, by every
  14. >company. I don't know of any the routinely do vertical printing
  15. >though. Look at all the other stuff that printf can do that almost
  16. >never gets used. When was the last time you used an "*" in a print
  17. >specifier to pass the length of the output as a variable?
  18.  
  19. I use that one quite a lot, and love it dearly; it saves me the trouble
  20. of doing a two-pass thing to create a format string.  Lovely feature.
  21.  
  22. I'd kill for %<, which takes a 'char *(*)(void *)' and any other value,
  23. but I see no sane way to do it.  Maybe if the fptr took a va_list that
  24. it could increment... :)
  25.  
  26. >Delmiters are used pretty much any time you print numbers larger than
  27. >3 digits in business.
  28.  
  29. True, and a nice locale-based extension, IMO.
  30.  
  31. -s
  32. -- 
  33. Peter Seebach - seebs@solon.com - Copyright 1995 Peter Seebach.
  34. C/Unix proto-wizard -- C/Unix questions? Send mail for help.  No, really!
  35. Using trn?  Weird new newsgroup problem?  I know the fix!  Email me!
  36. The *other* C FAQ - ftp taniemarie.solon.com /pub/c/afq - Not A Flying Toy
  37.